<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<%
	response.setHeader("Pragma", "No-cache");
	response.setHeader("Cache-Control", "no-cache");
	response.setDateHeader("Expires", 0);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'ajaxtest.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		
		<script type="text/javascript" src="<%=path%>/base/js/jquery-1.8.0.min.js"></script>
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<script type="text/javascript">
			
			$(function(){
				$("#btnSelect").click(function(){
					select();
				});
			});
			
			function select(){
				$.post("<%=path%>/pusai-ajax/ajaxAction!ajaxMethod.action",
		
				{name: "John", time: "2pm"},
		
		    	 function(data){
		
		       		   alert("Data Loaded: " + data.result);
		
		   		});
	   		};
	</script>
	</head>

	<body>
		<input type="button" value="提交" id="btnSelect" />
		<br>
	</body>
</html>
